home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / mus / midi / MusicXRexxMacs.lha / macros / LOGICALSELECT.mxe < prev    next >
Text File  |  1997-02-04  |  3KB  |  177 lines

  1. /*  Logical Selector */
  2. /*  Fills the gap left by logical edit module     */
  3. /*  Allows Logical Selection of clock position in bar  */
  4. /*  Set up for 8 beat bars or less at the moment  */
  5. /* © Dick Doyle */
  6.  
  7.  
  8. options results      
  9. MXCOLUMN 1                             
  10.  
  11. MXRADIO "Notes,Poly AT,Control Change,Program Change,Channel AT,Pitch Bend,Play Sequence,Tempo Change,Mute Sequence,Solo Sequence" 
  12.  
  13. MXRADIO "Marked Area,All"    
  14.  
  15.  
  16.  
  17.  
  18.  
  19. MXCOLUMN 2
  20.  
  21. MXSLIDER 'Start Clock,0,1535,0'
  22. MXSLIDER 'End Clock,0,1535,1535'
  23. MXSLIDER "Channel Select,1,16,1"
  24. MXLABEL ''
  25. MXLABEL          'BEATS IN CLOCKS'
  26. MXLABEL      '1= 000- 191/2= 192- 383'   
  27. MXLABEL      '3= 384- 575/4= 576- 767'   
  28. MXLABEL      '5= 768- 959/6= 960-1151'   
  29. MXLABEL      '7=1152-1343/8=1344-1535' 
  30.  
  31.  
  32.  
  33.  
  34. MXREQUEST 'LOGICAL SELECTOR,SELECT'             
  35. if result == 0 then exit
  36.  
  37. MXVALUE 1
  38. i = Result
  39. if i = 0 then Etype = 'NOTE'
  40. if i = 1 then Etype = 'PAT'
  41. if i = 2 then Etype = 'CTL'
  42. if i = 3 then Etype = 'PGM'
  43. if i = 4 then Etype = 'CAT'
  44. if i = 5 then Etype = 'PBEN'
  45. if i = 6 then Etype = 'PSEQ'
  46. if i = 7 then Etype = 'TEMP'
  47. if i = 8 then Etype = 'MSEQ'
  48. if i = 9 then Etype = 'SSEQ'
  49.  
  50. MXVALUE 3
  51. x = result
  52.  
  53. MXVALUE 4
  54. y = result
  55.  
  56. MXVALUE 5
  57. Chanum = result
  58.  
  59.  
  60. MXPOINTER "sleepy"
  61.  
  62. MXVALUE 2                            
  63. if result == 0 then BEGINSCAN 'selected'
  64. else BEGINSCAN 'all'                    
  65. if result ~= 0 then do forever    
  66.  
  67.   NEXTEVENT                                
  68. if result == 0 then break    
  69.  
  70.  
  71.  
  72. if EVENT.TYPE == Etype then do
  73. if Etype = "NOTE" then do
  74. if event.start.clocks >= x then
  75. if event.start.clocks <= y then
  76. if event.channel == chanum - 1 then
  77. REPLEVENT
  78. MXOPTION "SELECTED" 
  79. end 
  80. end
  81.  
  82. if EVENT.TYPE == Etype then do
  83. if Etype = "PAT" then do
  84. if event.start.clocks >= x then
  85. if event.start.clocks <= y then
  86. if event.channel == chanum - 1 then
  87. REPLEVENT
  88. MXOPTION "SELECTED"
  89. END
  90. END
  91.  
  92. if EVENT.TYPE == Etype then do
  93. if Etype = "CTL" then do
  94. if event.start.clocks >= x then
  95. if event.start.clocks <= y then
  96. if event.channel == chanum - 1 then
  97. REPLEVENT
  98. MXOPTION "SELECTED"
  99. END 
  100. END
  101.  
  102. if EVENT.TYPE == Etype then do
  103. if Etype = "PGM" then do
  104. if event.start.clocks >= x then
  105. if event.start.clocks <= y then
  106. if event.channel == chanum - 1 then
  107. REPLEVENT
  108. MXOPTION "SELECTED"
  109. END
  110. END
  111.  
  112. if EVENT.TYPE == Etype then do
  113. if Etype = "CAT" then do
  114. if event.start.clocks >= x then
  115. if event.start.clocks <= y then
  116. if event.channel == chanum - 1 then
  117. REPLEVENT
  118. MXOPTION "SELECTED"
  119. END
  120. END
  121.  
  122. if EVENT.TYPE == Etype then do
  123. if Etype = "PBEN" then do
  124. if event.start.clocks >= x then
  125. if event.start.clocks <= y then
  126. if event.channel == chanum - 1 then
  127. REPLEVENT
  128. MXOPTION "SELECTED"
  129. END
  130. END
  131.  
  132. if EVENT.TYPE == Etype then do
  133. if Etype = "PSEQ" then do
  134. if event.start.clocks >= x then
  135. if event.start.clocks <= y then
  136. REPLEVENT
  137. MXOPTION "SELECTED"
  138. END
  139. END
  140.  
  141. if EVENT.TYPE == Etype then do
  142. if Etype = "TEMP" then do
  143. if event.start.clocks >= x then
  144. if event.start.clocks <= y then
  145. REPLEVENT
  146. MXOPTION "SELECTED"
  147. END 
  148. END
  149.  
  150. if EVENT.TYPE == Etype then do
  151. if Etype = "MSEQ" then do
  152. if event.start.clocks >= x then
  153. if event.start.clocks <= y then
  154. REPLEVENT
  155. MXOPTION "SELECTED"
  156. END 
  157. END
  158.  
  159. if EVENT.TYPE == Etype then do
  160. if Etype = "SSEQ" then do
  161. if event.start.clocks >= x then
  162. if event.start.clocks <= y then
  163. REPLEVENT
  164. MXOPTION "SELECTED"
  165. END
  166. END
  167.  
  168.  
  169. end
  170. ENDSCAN                                    
  171.  
  172. MXPOINTER "normal"
  173.  
  174.  
  175.  
  176. exit
  177.